home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / ncsat.cpt / Telnet2.5 final / vs / vsdata.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-14  |  4.1 KB  |  105 lines

  1. /*
  2.  *        %W%    (NCSA)    %G%
  3.  *
  4.  *      Virtual Screen Kernel Data/Structure Definitions
  5.  *                          (vsdata.h)
  6.  *  
  7.  *    National Center for Supercomputing Applications
  8.  *      by Gaige B. Paulsen
  9.  *
  10.  *    This file contains the control and interface calls for the NCSA
  11.  *  Virtual Screen Kernel.
  12.  *
  13.  *      Version Date    Notes
  14.  *      ------- ------  ---------------------------------------------------
  15.  *      0.01    861102  Initial coding -GBP
  16.  *        2.1        871130    NCSA Telnet 2.1 -GBP
  17.  *        2.2     880715    NCSA Telnet 2.2 -GBP
  18.  *
  19.  */
  20.  
  21. #define MAXWID 132      /* The absolute maximum number of chars/line */
  22.  
  23. struct VSline
  24.   {
  25.     struct VSline
  26.       /* doubly-linked list of lines */
  27.         *next,          /* Pointer to next line */
  28.         *prev;          /* Pointer to previous line */
  29.     char                  /* Text for the line -- may be part of a block */
  30.         *text;          /* of memory containing more than one line */
  31.     int                 /* flag for memory allocation coordination */
  32.         mem;            /* nonzero for first line in memory block */
  33.   };
  34.  
  35. typedef struct VSline
  36.     VSline;
  37. typedef VSline
  38.     *VSlinePtr;
  39. typedef VSlinePtr
  40.     *VSlineArray;
  41.  
  42. #define maxparms 16
  43.  
  44. struct VSscrn {
  45.     VSlinePtr
  46.          scrntop,           /* topmost line of the current screen (= linest[0]) */
  47.          buftop,            /* top (i e oldest line) of scrollback buffer     */
  48.          vistop;            /* topmost line within visible region (may be in screen or scrollback area) */
  49.     VSlineArray
  50.         attrst,             /* pointer to array of screen attribute lines   */
  51.         linest;             /* pointer to array of screen text lines        */
  52.     int  lines,                /* How many lines are in the screen arrays      */
  53.          maxlines,          /* maximum number of lines to save off top      */
  54.          numlines,          /* number of lines currently saved off top      */
  55.          allwidth,          /* allocated width of screen lines              */
  56.          maxwidth,          /* current screen width setting (<= allwidth)   */
  57.          savelines,         /* save lines off top? 0=no                     */
  58.          forcesave,            /* NCSA 2.5: always force lines to be saved off top */
  59.          ESscroll,            /* Scroll screen when ES received                */
  60.          attrib,            /* current character writing attributes         */
  61.          x,y,               /* current cursor positon                       */
  62.          Px,Py,Pattrib,     /* saved cursor position and writing attributes */
  63.          VSIDC,             /* Insert/delete character mode 0=draw line     */
  64.          DECAWM,            /* Auto Wrap Mode 0=off                         */
  65.          DECCKM,            /* Cursor Key Mode                              */
  66.          DECPAM,            /* keyPad Application Mode                        */
  67.          DECORG,            /* origin mode                                  */
  68.          G0,G1,                /* Character set identifiers                     */
  69.          charset,            /* Character set mode                             */
  70.          IRM,               /* Insert/Replace Mode                          */
  71.          escflg,            /* Current Escape level                            */
  72.          top, bottom,       /* Vertical bounds of scrolling region             */
  73.          Rtop,Rbottom,        /* Vertical bounds of visible region             */
  74.          Rleft,Rright,        /* Horizontal bounds of visible region             */
  75.          parmptr;           /* index of current parm                         */
  76.     int  parms[maxparms];   /* Ansi Parameters                             */
  77.     char *tabs;             /* pointer to array for tab settings             */
  78.                             /* contains 'x' at each tab position, blanks elsewhere */
  79.     };
  80.  
  81. typedef struct VSscrn VSscrn;
  82.  
  83. struct VSscrndata {
  84.     VSscrn *loc;            /* Location of the Screen record for this scrn */
  85.     short
  86.         captureRN,    /* capture file's RefNum                       */    /* BYU 2.4.18 */
  87.         stat;        /* status of this screen (0=Uninitialized,     */    /* BYU 2.4.18 */
  88.                     /*                        1=In Use             */    /* BYU 2.4.18 */
  89.                     /*                        2=Inited, but not IU */    /* BYU 2.4.18 */
  90.     };
  91.  
  92. typedef struct VSscrndata VSscrndata;
  93.  
  94. #ifdef VSMASTER
  95. VSscrn  *VSIw;
  96. int      VSIwn;
  97. #else
  98. extern VSscrn   *VSIw;
  99. extern int       VSIwn;
  100. #endif
  101.  
  102. #define    VSPBOTTOM    (VSIw->lines)
  103.  
  104. #include <stdio.h>
  105.